<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <head>
    </head>
    <body>
        <ui:composition template="/templates/default.xhtml">
		 	<ui:define name="title">OpenHDS - Create Round Code</ui:define>
		
			<ui:param name="crud" value="#{roundCrud}" />
			
            <ui:define name="listing">
				<ui:include src="list.xhtml" />
            </ui:define>
            <ui:define name="display">
            
            	<h:outputText value="#{navController.breadcrumbTrail}" />
            
				<h1>#{msg.roundCreate}</h1>
                <h:messages id="errors" globalOnly="true" />
                <h:form id="roundForm">
                    <h:panelGrid columns="3">
                        <h:outputText value="#{msg.roundNumber}:"/>
                        <h:inputText id="roundNum" value="#{roundCrud.item.roundNumber}" converter="#{defaultConverter}" />
                        <h:message for="roundNum" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.roundStartDate} (#{siteProperties.dateFormat})"/>
                        <o:dateChooser id="startDate" value="#{roundCrud.startDate}" pattern="#{siteProperties.dateFormat}" />
                        <h:message for="startDate" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.roundEndDate} (#{siteProperties.dateFormat})"/>
                        <o:dateChooser id="endDate" value="#{roundCrud.endDate}" pattern="#{siteProperties.dateFormat}" />
                        <h:message for="endDate" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.roundRemarks}:"/>
                        <h:inputText id="remarks" value="#{roundCrud.item.remarks}" />
                        <h:message for="remarks" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>
                    </h:panelGrid>
                    <script>
		            	document.getElementById('roundForm:roundNum').focus();
		            </script>
                    <br />
                    <h:commandButton id="create" action="#{roundCrud.create}" value="#{msg.lblCreate}"/>
                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>